Bump prosemirror-tables so that findTable is always available on @tiptap/pm#7906
Conversation
🦋 Changeset detectedLatest commit: 4025cfa The changes in this PR will be included in the next version bump. This PR includes changesets to release 72 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for tiptap-embed ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
ee2a194 to
c1a2ce8
Compare
|
Unfortunately the version bump breaks the tests because of how HTML is generated in the new versions of ProseMirror: |
Is there a way to inspect HTML or the computed style object via playwright? Maybe that's safer than using the actual style tag to check for it? That way we don't need to worry about it breaking in the future again. :) |
Yes. you can assert computed CSS: const paragraph = page.locator('p').filter({ hasText: '...' })
await expect(paragraph).toHaveCSS('text-align', 'left') |
formatting changes
|
Nice, thanks! |
Changes Overview
Bump
prosemirror-tablesin@tiptap/pmand the demos workspace sofindTableis available, and align the related ProseMirror dependencies required by the newer tables package.Implementation Approach
Updated the dependency pins owned by
@tiptap/pm, mirrored them in the demos workspace, refreshed the lockfile, and added a patch changeset for@tiptap/pm.Testing Done
I also had to update a few test expectations because the newer dependency versions serialize HTML a little differently. The editor still behaves the same, but the exact strings in the tests changed.
For example,
text-align: leftis now serialized astext-align: left;, so the TextAlign demo tests now expect<p style="text-align: left;">...instead of<p style="text-align: left">....The same thing happened for table markup and text-style commands: styles such as
min-width,color,background-color,font-family,font-size, andline-heightnow include the trailing semicolon in the generated HTML, so those assertions were updated to match the new output.One whitespace case also changed: when preserving whitespace during
insertContent, the content is now rendered with<br>instead of a doubled space in the HTML output, so that expectation was updated too.The CustomDocument demo test also needed a small interaction fix. The test was clicking the editor wrapper before pressing
EndandEnter; under parallel Playwright runs that did not always put the caret inside the heading, so the generated paragraph existed but typing did not land in it. The test now clicks the heading itself, then pressesEndandEnter, and types through the current keyboard focus. That keeps the test aligned with the user interaction it is checking: pressing Enter after the heading should move into the paragraph.Verification Steps
Build or import
@tiptap/pmand confirmfindTableresolves fromprosemirror-tables.Additional Notes
The lockfile update is included in the branch as requested.
AI Usage
Checklist
Related Issues
Closes TT-497